package com.example.demo.controller;

import com.example.demo.dto.ResponseResult;
import com.example.demo.entity.Museum;
import com.example.demo.service.MuseumService;
import com.example.demo.service.impl.MuseumServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/app/museum")
public class MuseumController {

    private final MuseumService museumService;

    @Autowired
    public MuseumController(MuseumServiceImpl museumServiceImpl) {
        this.museumService = museumServiceImpl;
    }

    @GetMapping("/get/intro")
    public ResponseResult<Museum> getMuseumIntro() {
        Museum museum = museumService.getMuseumIntro();
        return new ResponseResult<>(200,"响应成功！",museum);
    }
}
